<!DOCTYPE html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  
 </head>
 <body>
  <script>
 var sum = 0;
for(var i=1;i<=100;i++){
    sum += i;
}
document.write(sum);    		//输出5050
//continue越过一次循环
for(var i=0;i<10;i++){
        if(i==5){
            continue;       	//跳过此次循环，继续下一循环
        }
        document.write(i+",");
    }
//跳出循环
for(var i=0;i<10;i++){
        if(i==5){
            break;      		//跳出整个循环
        }
        document.write(i+",");
    }
  </script>
 </body>
</html>
